package cn.com.oceansoft.business.os.api.vote.service.impl;


import cn.com.oceansoft.business.os.api.qrcode.domain.User;
import cn.com.oceansoft.business.os.api.vote.domain.Show;
import cn.com.oceansoft.business.os.api.vote.persistence.IVoteMapper;
import cn.com.oceansoft.business.os.api.vote.service.IVoteService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 系统字典数据库操作映射器
 *
 * @author: chenw
 * @time: 2014/5/26 0026 下午 19:28
 */
@Service
public class VoteService implements IVoteService {
    @Resource
    private IVoteMapper iVoteMapper;

    @Override
    public List<Show> getshowListAll() {
        return iVoteMapper.getshowListAll();
    }

    @Override
    public User findUserByOpenId(String openId) {
        return iVoteMapper.findUserByOpenId(openId);
    }

    @Override
    public int countVote(String id) {
        return  iVoteMapper.countVote(id);
    }

    @Override
    public void uservote(String showid, int userid) {
        iVoteMapper.uservote(showid,userid);
    }

//    @Override
//    public User findUserByIdAndName(Map<String, String> param) {
//        return iVoteMapper.findUserByIdAndName(param);
//    }
//
//    @Override
//    public void saveCheckIn(CheckIn checkIn) {
//        iVoteMapper.saveCheckIn(checkIn);
//    }
//
//    @Override
//    public boolean checkUserLogin(String openId) {
//        int i =  iVoteMapper.checkUserLogin(openId);
//        if(i>0){
//            return false;
//        }
//        return true;
//    }
}
